<?php

namespace Index;

use C\L\WebController;

class SlideController extends WebController
{
    public function slidesAction()
    {
        $currentPage = $this->request->getQuery('page', 'int', 1);
        $perPage     = $this->request->getQuery('per_page', 'int', 20);
        $type        = $this->request->getQuery('type');

        $slides = $this->s_slide->paginate($type, 1, $currentPage, $perPage);

        return $this->success($slides);
    }
}
